package org.pixelami.twisted.spread.pb
{
	public class Local
	{
		public var object:Object;
		private var perspective:Object;
		private var refcount:int;
		
		public function Local(object:Object, perspective:Object=null)
		{
			this.object = object;
        	this.perspective = perspective;
        	this.refcount = 1;
		}
		
		public function toString():String
		{
	        return "<pb.Local "+object+" ref:"+refcount+">";
	 	}
	
	    public function  incref():int
	    {
	        /*
	        Increment and return my reference count.
	        */
	        this.refcount = this.refcount + 1;
	        return this.refcount;
	    }
	
	    public function  decref():int
	    {
	        /*
	        Decrement and return my reference count.
	        */
	        this.refcount = this.refcount - 1;
	        return this.refcount;
	    }

	}
}
